<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>分享漂流</title>
  <link rel="stylesheet" href="css/base.css">
  <link rel="stylesheet" href="css/my.css">
  <link rel="stylesheet" href="css/dropload.css">
  <meta name="viewport" content="width=device-width, initial-scale=1.0,maximum-scale=1, user-scalable=no">
</head>
<body>
<div class="header-box">
  <p>分享漂流</p>
</div>
<div class="shareBook">
  <div class="shareBook_box">
    <img src="img/my/tuceng 21@2x.png">
    <span>
      分享总收益: <i id="jifen">0</i><b style="font-size: 0.34rem;">&nbsp;积分</b>
    </span>
    <a href="shareBOO.html">
      <img src="img/my/tuceng 22@2x.png">分享绘本
    </a>
  </div>
</div>
<div class="huise3"></div>
<div class="shareBook_con">
  <div class="shareBook_con_title">
    <img src="img/my/tuceng 30@2x.png">
    <span>绘本漂流轨迹</span>
  </div>
  <div class="shareBook_con_bott" >
    <ul id="shareBook_con_bott_list">
<!--       <li> -->
<!--         <img src="img/index/tuceng 32@2x.png"> -->
<!--         <div class="box_right"> -->
<!--           <p> 牙虫大搬家 </p> -->
<!--           <p>(日)西本康子</p> -->
<!--           <p>最近借阅者： </p> -->
<!--           <p><img src="img/my/touxiang@2x.png"><b>永不言弃</b></p> -->
<!--         </div> -->
<!--       </li> -->
<!--       <li> -->
<!--         <img src="img/index/tuceng 30@2x.png"> -->
<!--         <div class="box_right"> -->
<!--           <p> 鸭子骑车记 </p> -->
<!--           <p>(美)大卫·香农</p> -->
<!--           <p>最近借阅者： </p> -->
<!--           <p><img src="img/my/touxiang@2x.png"><b>永不言弃</b></p> -->
<!--         </div> -->
<!--       </li> -->
<!--       <li> -->
<!--         <img src="img/index/tuceng 31@2x.png"> -->
<!--         <div class="box_right"> -->
<!--           <p> 胆小鬼威利 </p> -->
<!--           <p>(英)安东尼·布朗</p> -->
<!--           <p>最近借阅者： </p> -->
<!--           <p><img src="img/my/touxiang@2x.png"><b>永不言弃</b></p> -->
<!--         </div> -->
<!--       </li> -->
    </ul>
  </div>
</div>
<div class="footer_kb"></div>
<div class="footer_kb1"></div>
</body>
<!--  <li id="{{:book.id}}"> -->
<script id="book_show_tmpl" type="text/x-jsrender">
 <li id="{{:book.id}}">
        <div class="divImg"><img src="{{:book.bookImage1}}"></div>
        <div class="box_right">
          <p>{{:book.bookName}}</p>
        </div>
      </li>
</script>
<script src="js/jquery.js"></script><script src="js/jquery.cookie.js"></script>
<script src="js/base.js?v=base.js?v=20180102"></script>
<script src="js/jsrender.js"></script>
<script src="js/dropload.min.js"></script>
<script>
$(document).on("click","#shareBook_con_bott_list li",function (e) {
    //e.preventDefault();
    debugger
    
    var id = $(this).attr("id");
    self.location="trackDetails.html?id="+id;
  });
  var pageNum = 1;
  var pageSize = 5; 
  loadData();
  userJifen();
function loadData(){
	var userId = getUserId();
	$.get({
		url : window.baseUrl + "/api/book/bookStock/findPage",
		data : {
			ownerUid : userId,
			"pageNum" : pageNum,
			"pageSize" : pageSize
		},
		success : function(data) {
			var data = data.data.list;
			//$("#shareBook_con_bott_list").empty();
			var htmlOutput = $.templates("#book_show_tmpl").render(data);
			$("#shareBook_con_bott_list").append(htmlOutput);
		}
	});
}  

function userJifen(){
	
	$.get({
		url : window.baseUrl + "/api/book/user/find",
		data : {
			id : getUserId(),
		},
		success : function(data) {
			var chBalance = data.data.chBalance;
			$("#jifen").text(chBalance);
		}
	});
}  

var dropload = $('.shareBook_con_bott').dropload({
	domDown : {
        domClass   : 'dropload-down',
        domRefresh : '<div class="dropload-refresh">哈哈，到底啦，联系客服，继续分享哦!</div>',
    },
    scrollArea : window,
    autoLoad: false,
    loadDownFn : function(me){
    	 pageNum+=1;
    	 loadData();
    	 me.resetload();
    }
});	
</script>
</html>